#include"StudentManager.h"

enum Option
{
	EXIT,
	ADD,
	DEL,
	SEARCH,
	MODIFY,
	SORT,
	PRINT
};

int main()
{
	int input = 0;
	//创建人员名单
	Student stulist;//人员名单
	//初始化人员名单
	InitStudent(&stulist);
	do 
	{
		menu();
		printf("请选择：\n");
		scanf_s("%d", &input);
		switch(input)
		{
			case ADD:
				AddStudent(&stulist);//修改一定传地址
				break;
			case DEL:
				DelStudent(&stulist);
				break;
			case SEARCH:
				SearchStudent(&stulist);//可以传值，但传地址效率更高
				break;
			case MODIFY:
				ModifyStudent(&stulist);
				break;
			case SORT:
				SortStudent(&stulist);
				break;
			case PRINT:
				PrintStulist(&stulist);
				break;
			case EXIT:
				printf("退出管理系统\n");
			default:
				break;
		}
	} while (input);
	SaveFile(&stulist);
}





























